﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:InternetCafeApp.View"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="using:Callisto.Controls"
    x:Class="InternetCafeApp.View.AddReservation"
    xmlns:extensions="using:WinRTXamlToolkit.Controls.Extensions"
    mc:Ignorable="d">
    <Page.Resources>
        <Style
            x:Key="ValidationErrorLabelStyle"
            TargetType="TextBlock">
            <Setter
                Property="Foreground"
                Value="Red" />
            <Setter
                Property="FontSize"
                Value="18" />
            <Setter
                Property="Margin"
                Value="5" />
        </Style>
    </Page.Resources>
    <Grid Background="#3dc9e7">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="*" />
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Background="#FF328918" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="Add Reservation" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1" IsHitTestVisible="false"/>
        </Grid>
        <Grid Grid.Row="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="80" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />

                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />
                <RowDefinition Height="56" />

                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <TextBlock Text="New" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1" IsHitTestVisible="false"/>
            <TextBlock Grid.Column="1" Grid.Row="1"  TextWrapping="Wrap"  FontSize="40" Text="Name :" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="2"  TextWrapping="Wrap"  FontSize="40" Text="Gender :" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="3"   TextWrapping="Wrap" FontSize="40" Text="Check In :" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="4"   TextWrapping="Wrap" FontSize="40" Text="Check Out :" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="5"   TextWrapping="Wrap" FontSize="40" Text="Room No:" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="6"   TextWrapping="Wrap" FontSize="40" Text="WebCam:" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="7"   TextWrapping="Wrap" FontSize="40" Text="Card Reader:" TextAlignment="Right" />
            <TextBlock Grid.Column="1" Grid.Row="8"   TextWrapping="Wrap" FontSize="40" Text="Status :" TextAlignment="Right" />
            <Button x:Name="btnSave" Grid.Column="1" Grid.Row="9" Content="Save"  Height="68" Width="324" Background="#FF40A009" Click="btnSave_Click"/>
            <Button x:Name="btnCancel" Grid.Column="3" Grid.Row="9" Content="Cancel"   Height="68" Width="324"  Background="#FFE40C0C" Click="btnCancel_Click"/>
            <ComboBox x:Name="comboxClientName" Grid.Column="3" Height="50" Grid.Row="1"  ItemsSource="{Binding Clients}" 
                      SelectedItem="{Binding SelectedItemClient, Mode=TwoWay}"
                      DisplayMemberPath="name"
                      SelectedValuePath="name"
                      SelectedValue="{Binding Path=SelectedItemClient}" SelectionChanged="comboxClientName_SelectionChanged"
                      />
            <Button x:Name="btnAddName" Style="{StaticResource AddAppBarButtonStyle}"  Grid.Column="4" Grid.Row="1" HorizontalAlignment="Left" Click="btnAddName_Click" Margin="-5,-10,10,0" />
            <Controls:WatermarkTextBox Grid.Column="5" Grid.Row="1" x:Name="txtName"  Height="52" TextWrapping="Wrap" FontSize="30"/>
            <ToggleSwitch Grid.Column="3" Grid.Row="2" x:Name="tgGender" IsOn="{Binding SelectedItemClient.gender}" OnContent="Male" OffContent="Female" />
            <Controls:WatermarkTextBox Grid.Column="3" Grid.Row="3" x:Name="txtCheckIn" IsEnabled="False" Text="{Binding SelectedItemRecord.checkIn}" Height="52" TextWrapping="Wrap"  TextAlignment="Left" FontSize="30"/>
            <TextBlock Grid.Column="4" Grid.Row="3"   TextWrapping="Wrap" FontSize="40" Text=" OR " TextAlignment="Justify" />
            <ComboBox Name="combCheckIn" Grid.Column="5" Grid.Row="3" SelectionChanged="combCheckIn_SelectionChanged" SelectedValuePath="Tag" >
                <ComboBoxItem Content="Select Time Interval" Tag="0"/>
                <ComboBoxItem Content="30 Minute" Tag="30" />
                <ComboBoxItem Content="1 Hour" Tag="60"/>
                <ComboBoxItem Content="1 Hour and 30 Minute" Tag="90"/>
                <ComboBoxItem Content="2 Hour" Tag="120"/>
                <ComboBoxItem Content="3 Hour" Tag="180"/>
                <ComboBoxItem Content="4 Hour" Tag="240"/>
                <ComboBoxItem Content="Unlimited" Tag="-1"/>
            </ComboBox>
            <Controls:WatermarkTextBox Grid.Column="3" Grid.Row="4" x:Name="txtCheckOut" IsEnabled="False" Text="{Binding SelectedItemRecord.checkOut}"  Height="52" TextWrapping="Wrap"  TextAlignment="Left" FontSize="30"/>
            <ComboBox x:Name="comboBoxRooms" Grid.Column="3" Height="50" Grid.Row="5"  ItemsSource="{Binding Rooms}" 
                      SelectedItem="{Binding SelectedItemRoom, Mode=TwoWay}"
                      DisplayMemberPath="roomNo"
                      SelectedValuePath="roomNo"
                      SelectedValue="{Binding Path=SelectedItemRoom}" SelectionChanged="comboBoxRooms_SelectionChanged"
                      />
            <CheckBox Grid.Column="3" Grid.Row="6" x:Name="chkWebCam" IsChecked="{Binding SelectedItemRecord.isWebCam}"  />
            <CheckBox Grid.Column="3" Grid.Row="7" x:Name="chkCardReader"  IsChecked="{Binding SelectedItemRecord.isCardReader}"  />
            <CheckBox Grid.Column="3" Grid.Row="8" x:Name="chkStatus"  IsChecked="{Binding SelectedItemRecord.active}" />

        </Grid>
        <Grid Grid.Row="2" Background="#99FF0000">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Message :" Grid.Column="0" FontSize="30" />
            <TextBlock Name="txtMessageBar" Text="No Message Yet" Grid.Column="1" FontSize="30" />
        </Grid>
        <Grid Grid.Row="3" Background="#FFB00505" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="© 2013 TriadsLabs. All Right Reserved." FontFamily="Gautami" FontSize="40" Grid.Column="1" IsHitTestVisible="false" TextAlignment="Center"/>
        </Grid>
    </Grid>
</Page>